import requestTool from "../requestTool";

const rootUrl = "/user"

const gainAccessMap = {
    Login: {
        method: 'post',
        url: '/login',
        ContentType: 'json',
        submitData: {
            username: 'username',
            password: 'passwd',
            validate: 'validCode',
        }
    },
    getValicode:{
        method: 'get',
        url: '/checkCodeBase64',
    },
    RegisterPost:{
        method: 'get',
        url: '/registerLink',
        submitData: {
            email: 'email'
        }
    },
    Register: {
        method:'post',
        url: '/register',
        ContentType: 'json',
        submitData:{
            username: 'username',
            password: 'passwd'
        }
    },
    reSetpwd: {
        method: 'get',
        url: '/forget_pwd',
        submitData:{
            email: 'email'
        }
    },
    resetPasswdByUser:{
        method: 'put',
        url: '/edit/',
        ContentType: 'json',
        submitData: {
            id: 'id',
            password: 'password'
        }
    }
}

export default requestTool(gainAccessMap,rootUrl)